<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<title><?php echo CHtml::encode($this->pageTitle); ?></title>
<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/reset.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/slider1.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.lazyload.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/easySlider1.5.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.masonry.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.infinitescroll.js"></script>
<script type="text/javascript">
		$(document).ready(function(){	
			$("#slider").easySlider({
				auto: true,
				continuous: true 
			});
		});	
	</script>
<script type="text/javascript">
function item_masonry(){ 
	$('.item img').load(function(){ 
		$('.infinite_scroll').masonry({ 
			itemSelector: '.masonry_brick',
			columnWidth:232,
			gutterWidth:15								
		});		
	});
		
	$('.infinite_scroll').masonry({ 
		itemSelector: '.masonry_brick',
		columnWidth:232,
		gutterWidth:15								
	});	
	
}

$(function(){

	function item_callback(){ 
		
		$('.item').mouseover(function(){
			$(this).css('box-shadow', '0 1px 5px rgba(35,25,25,0.5)');
			$('.btns',this).show();
		}).mouseout(function(){
			$(this).css('box-shadow', '0 1px 3px rgba(0,0,0,0)');
			$('.btns',this).hide();		 	
		});
		
		item_masonry();	

	}

	item_callback();  

	$('.item').fadeIn();

	var sp = 1
	
	$(".infinite_scroll").infinitescroll({
		navSelector  	: "#more",
		nextSelector 	: "#more a",
		itemSelector 	: ".item",
		
		loading:{
			img: "images/masonry_loading_1.gif",
			msgText: ' ',
			finishedMsg: '木有了',
			finished: function(){
				sp++;
				if(sp>=10){ //到第10页结束事件
					$("#more").remove();
					$("#infscr-loading").hide();
					$("#page").show();
					$(window).unbind('.infscr');
				}
			}	
		},errorCallback:function(){ 
			$("#page").show();
		}
		
	},function(newElements){
		var $newElems = $(newElements);
		$('.infinite_scroll').masonry('appended', $newElems, false);
		$newElems.fadeIn();
		item_callback();
		return;
	});

});
</script>
<script type="text/javascript">
$(function(){
	$("img[original]").lazyload({ placeholder:"images/color3.gif" });
});

//部分区域图片延迟加载
function lazyloadForPart(container) {
    container.find('img').each(function () {
        var original = $(this).attr("original");
        if (original) {
            $(this).attr('src', original).removeAttr('original');
        }
    });
}
function setContentTab(name, curr, n) {
    for (i = 1; i <= n; i++) {
        var menu = document.getElementById(name + i);
        var cont = document.getElementById("con_" + name + "_" + i);
        menu.className = i == curr ? "current" : "";
        if (i == curr) {
            cont.style.display = "block";
            lazyloadForPart($(cont));
        } else {
            cont.style.display = "none";
        }
    }
}
</script> 

</head>
<body>
<!--顶部-->

<?php include_once 'header.php';?>

<div class="index mid">
<div class="top mid">
  <div class="top_part"><a href="./"><img src="images/logo1.jpg" border="0" /></a></div>
  <div class="top_part"><a href="#"><img src="images/logo2.jpg" border="0" /></a></div>
  <div class="top_part"><a href="#"><img src="images/header_pic.jpg" border="0" /></a></div>
   <div class="top_part">
      <div class="top_search">
         <form action="<?php echo $this->createUrl('site/list');?>" method="post">
		  <input type="hidden" name="action" id="action" value="save"/>
         <div class="search_main"><input class="top_inputs" id="ProductName" name="ProductName" /></div>
         <div class="search_go"><input class="search_btn" value="搜索" type="submit" /></div>
         </form>
         
      </div>
      <!--<div class="search_link">热门搜索：<a href="#">化妆品</a> <a href="#">护肤品</a></div>-->
   </div>
</div>
<div class="menu mid">

  		<?php 
  		$this->widget('zii.widgets.CMenu',array(
			'items'=>array(
  		        array('label'=> CHtml::image('images/listbg.jpg','',array('boder'=>0)), 'url'=>array(''),'itemOptions'=>array('class'=>'list')),
				array('label'=>'首页', 'url'=>array('/site/index')),
				array('label'=>'美妆', 'url'=>array('/site/list','cateid'=>11010)),
				array('label'=>'美饰', 'url'=>array('/site/list','cateid'=>11011)),
				array('label'=>'美包', 'url'=>array('/site/list','cateid'=>11012)),
				array('label'=>'美鞋', 'url'=>array('/site/list','cateid'=>11013)),
				array('label'=>'美装', 'url'=>array('/site/list','cateid'=>11014)),
				array('label'=>'申请试用', 'url'=>array(''),'itemOptions'=>array('class'=>'sy')),
			),
			'htmlOptions' => array('sizcache'=>'0','sizset'=>'3'),
		    //'htmlOptions' =>array('id'=>'cur'),
			'encodeLabel' => false,			
		)); ?>

<script>
 $(".active").attr("id","cur");
</script>
</div>
<!--end-->

<!--中部-->

	<?php echo $content; ?>

</div>
<!--底部资料-->  
<div class="bottom">
   <div class="faq mid">
      <ul>
         <li>
         <span>使用帮助</span><br />
         <?php echo $this->getFooterInfo(110);?>
         </li>
         <li>
         <span>售后服务</span><br />
         <?php echo $this->getFooterInfo(111);?>
         </li>
         <li>
         <span>关于百觅</span><br />
          <?php echo $this->getFooterInfo(112);?>
         </li>
         <li>
         <span>加入百觅</span><br />
         <?php echo $this->getFooterInfo(113);?>
         </li>
         <li>
         <span>支付方式</span><br />
         <?php echo $this->getFooterInfo(114);?>
         </li>
      </ul>
   </div>
   <div class="icon mid"><img alt="" src="images/icon.jpg" /></div>
   <div class="copyright mid">
2013 100me.cn All Rights Reserved 百觅美丽（100me）版权所有  <br />
备案/许可证编号：粤ICP备10207265号 
   </div>
</div>
</body>
</html>
<script type="text/javascript">
// 鼠标滑过显示  一次引用，实现多个切换
var slides = ["tab01"];
for(var i=0; i<slides.length; i++){
  var elemTit = document.getElementById(slides[i]).getElementsByTagName("h1")[0].getElementsByTagName("span");
  var elemCon = document.getElementById(slides[i]).getElementsByTagName("ul");
  slide({ handle:elemTit, content:elemCon, current:"current", mode:"mouseover" });
}
</script>
